#ifndef MYDATABASE_H
#define MYDATABASE_H

#include <QObject>
#include<QtSql>

class MyDataBase : public QObject
{
    Q_OBJECT
public:
    explicit MyDataBase(QObject *parent = 0);

    static MyDataBase& GetDBInstances()   //Gets the log instance
    {
            static MyDataBase db;          //Single mode
            return db;
    }

    void initDB();

    #define g_db MyDataBase::GetDBInstances()   

    bool checkLogin(QString strname,QString strps);
    bool addUser(QString strname,QString strps);

    QSqlDatabase dbconn;
signals:

public slots:

};

#endif // MYDATABASE_H
